package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.dto.Statistic;
import net.wanho.service.StatisticsService;
import net.wanho.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/statistics")
@RequiredArgsConstructor
@RestController
public class StatisticsController {
    private final StatisticsService statisticsService;
    @GetMapping("/store-invent")
    public R storeInvent(){
        List<Statistic> list = statisticsService.storeInvent();
        return R.success(list);

    }
}
